The invention relates to memory backup and restoration of digital information, and more particularly, to a hardware assisted memory backup system and method using nonvolatile memory.
The need for emerging file server technology with multi-protocol file system semantics has created unique problems in data management for file service operations, such as saving data to disk storage in real-time and reliably. These problems are further exacerbated by the potential of catastrophic system failures, such as operating system (O/S) hang-up, and/or unexpected power failures and system resets. For some applications, the loss of certain types of data may not pose any serious problems. For client/server applications, however, if the system loses xe2x80x9cmetaxe2x80x9d data, i.e., information concerning a system""s file structure, the file structure will be difficult, if not impossible, to reconstruct.
In a typical client/server application, a client computer can request a server computer to store file system data to a permanent storage device, such as a hard disk. Because a typical write transaction can take several operations to complete, the client data is temporarily stored in server memory until the write transaction is successfully completed. Once the data is safely stored to disk, the server computer can inform the client computer that the write transaction was completed. This entire store transaction can take as long as 20 milliseconds, which is a long delay for the client.
Unfortunately, if a catastrophic event occurs while all or some of the data is still in system memory, data loss can occur. Data loss occurs because the server system memory typically is volatile memory, such as Dynamic Random Access Memory (DRAM) or Static Random Access Memory (SRAM). For example, DRAM employs a system of transistors and capacitors to retain data. Because the capacitors cannot maintain an electrical charge indefinitely, the capacitors must be continuously refreshed by a power supply. Thus, backing-up data stored in DRAM in the event of a power failure presents the additional problem of refreshing DRAM until all data has been safely transferred to nonvolatile memory.
Some conventional systems automatically transfer data from volatile memory (e.g., SRAM) to nonvolatile memory (e.g., Electrical Erasable Programmable Read-only Memory (EEPROM)), if the chip power drops below a first predetermined voltage (e.g., 4.2 volts from 5 volts). If the chip power drops below the first predetermined voltage, a store operation is started that continues until the chip power drops below a second predetermined voltage (e.g., 3.5 volts), after which time the integrity of the data being transferred from volatile memory becomes uncertain. Thus, the store operation must complete before the chip power drops below the second predetermined voltage.
The conventional systems described above provide a solution for systems requiring a limited amount of data transfer, such as 32K. Unfortunately, the amount of data that can be safely transferred by these systems is limited by the finite interval of time where the chip power is sufficiently high to ensure a successful data transfer. Unfortunately, for systems requiring a larger data transfer, such as 8 Mb or more, these conventional systems do not provide a solution. Moreover, these systems typically cannot operate with DRAM because they do not provide a refresh engine that can operate during power failure events. As discussed above, a refresh engine, or its equivalent, is necessary in DRAM based systems to maintain data stored in volatile memory while such data is being backed-up to nonvolatile memory.
An additional problem with some conventional systems is their inability to provide memory backup in response to events other than power failure events, such as unexpected system resets or O/S hang-up. The conventional systems are unable to differentiate between normal system shutdowns and unexpected system shutdowns initiated by, for example, a user pressing a hardware reset button. The inability to differentiate between normal and unexpected system shutdowns can decrease the life of the nonvolatile memory employed in such systems because of the finite number of write cycles available in such memories. The ability to prolong the xe2x80x9cwritexe2x80x9d life of nonvolatile memory is important when one considers that a typical EEPROM cell or flash memory cell can break down after a finite number of write cycles.
Still another problem with conventional systems and methods is how such systems and methods store O/S kernel code for rebooting the system after a catastrophic failure. In conventional embedded systems, O/S kernel code is usually stored in specialized nonvolatile memory, which requires additional memory mapping, and modification of BIOS to load and initialize the kernel. Storing O/S kernel code in specialized nonvolatile memory typically increases the number of system components, increases BIOS development and maintenance efforts, and reduces system boot speed.
Accordingly, there remains a need for a memory backup system and method that copies digital information from volatile memory to nonvolatile memory in response to catastrophic events, such as O/S hang-up and unexpected power failures and system resets. The system and method should be able to quickly copy a relatively large amount of information (e.g., 8 Mb or greater) from volatile memory (e.g., DRAM) to nonvolatile memory without corrupting the integrity of the information. Moreover, the system and method should be able to differentiate between normal system shutdown events and unexpected shutdown events to preserve the xe2x80x9cwritexe2x80x9d life of the nonvolatile memory. The system and method should also use conventional memory chip formats and packaging, such as Dual In-line Memory Module (DIMM) or Single In-line Memory Module (SIMM). These conventional package formats can enable the system to easily couple with the system memory bus of a conventional computer system, such as a Personal Computer (PC).
Additionally, there is a need for storing O/S kernel code into main system memory to reduce the number of system components, reduce BIOS development and maintenance efforts, and improve system boot speed.
The present invention is directed to a hardware assisted memory module (HAMM) for communicating digital information between volatile and nonvolatile memory in response to a trigger event from, for example, a host computer system. The HAMM generally includes a volatile memory coupled to an information source for receiving and storing information; a nonvolatile memory coupled to the volatile memory for receiving and storing information communicated from the volatile memory; and a controller coupled to the memories for controlling the communication of information between the memories in response to the trigger event. The controller can determine the type of the trigger event from, for example, control information stored in the volatile memory.
In a preferred embodiment of the present invention, the HAMM is coupled to a host computer system, such as a PC. During normal operation of the computer system, the HAMM behaves like a conventional memory module, for example, storing digital information received from a data bus. The HAMM, however, detects and responds with a memory backup operation to at least one of the following events: 1) unexpected power failure, 2) operating system hang-up, or 3) unexpected system reset. Upon detection of an event, the HAMM electronically isolates itself from the host computer system before copying the digital information from volatile memory to nonvolatile memory. Once isolated the HAMM takes its power from an auxiliary power supply, such as a battery.
The HAMM can be configured to copy all or part of the digital information to nonvolatile memory. Upon either a request or at power-up, the HAMM copies the digital information from nonvolatile memory into volatile memory. If there is a normal or expected computer shutdown, the O/S warns the HAMM before shutting down the host computer system, thereby precluding the HAMM from performing the memory backup operation. The O/S determines whether the previous shutdown, if any, was unexpected by reading a control register in a reserved area of volatile memory, preferably outside the memory map of the volatile memory. If the O/S wants the file information restored, it orders the HAMM to restore the backed-up file information from nonvolatile memory to volatile memory.
The present invention is also directed to a memory backup system. The system is coupled to a host computer system for providing memory backup in response to a trigger event. The system includes a volatile memory coupled to an information source for receiving and storing information; a nonvolatile memory coupled to the volatile memory for receiving and storing information communicated from the volatile memory; and a controller coupled to the memories for controlling the communication of information between the memories in response to the trigger event. The controller determines the type of the trigger event from control information stored in the volatile memory.
The present invention is also directed to a memory backup method. The method includes the steps of: detecting a trigger event from a host computer system; determining if the trigger event is an unexpected host computer system failure or a normal host computer system shutdown by examining a data structure in volatile memory; copying digital information from volatile memory to nonvolatile memory only if the type of the trigger event is an unexpected host computer system failure; and storing control information relating to the type of the trigger event in volatile memory.
An advantage of the present invention can be best realized in a client/server application, where memory access time is reduced during write transactions. Because the HAMM provides assurance that data will be backed-up in the event of a catastrophic failure, a file server system can complete a transaction with a client even though all or part of the data to be transferred is still in volatile memory in the file server system. By completing the write transaction early, the overall transaction time is reduced. This time savings, multiplied by the number of write transactions that take place in a typical client/server application, can be significant.
Another advantage of the present invention described above, is the ability of the HAMM to copy large amounts of data (e.g., 8 Mb or larger) from volatile memory to nonvolatile memory. By using an auxiliary power supply, the volatile memory can be safely maintained until the data is copied. By contrast, some conventional systems must copy the data within the time interval just before the chip power drops below a predetermined voltage. Thus, these conventional systems can transfer only small amounts of data (e.g., 32K).
An advantage of using the auxiliary power supply as described above, is the ability to use different types of volatile memory, particularly memory that requires refresh, such as DRAM. The auxiliary power supply can be used to refresh the DRAM while data is being copied during unexpected system power failure.
An advantage of using isolation devices as described above, is the ability to isolate the HAMM from the host system""s power supply during control operations to prevent spurious events (e.g., power spikes, short circuits) from corrupting the data while performing control operations.
Another advantage of the present invention is the added flexibility of responding to multiple triggering events, rather than just system power failures. This advantage is important because other events, such as O/S hang-up and unexpected system resets, can also cause data loss. Conventional systems that protect only against system power failures do no provide adequate data protection for many applications.
Still another advantage of the present invention is the ability to permanently store a pre-initialized O/S kernel image in nonvolatile memory, and to quickly copy it into system memory using control logic disposed in the HAMM. From an O/S point of view, this is equivalent to permanently storing an O/S kernel in volatile system memory. Most conventional systems cannot provide this function cost-effectively. Thus, the present invention provides an important advantage over conventional embedded systems, and thin file systems in particular, by simplifying both the hardware and software used to store and retrieve the O/S kernel code, thereby increasing system boot speed.